package com.example.snackbar;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class normalListView extends AppCompatActivity {
    ListView normalListView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_normal_list_view);
        normalListView = findViewById(R.id.normalListView);
        normalListView();
    }
    public void normalListView(){
        String[] message = {"苹果","香蕉","橘子","梨","香蕉","橘子","梨","香蕉","橘子","梨","香蕉","橘子","梨","香蕉","橘子","梨","香蕉","橘子","梨"};
        normalListView.setAdapter(new ArrayAdapter<String>(normalListView.this,android.R.layout.simple_expandable_list_item_1,message));
    }
}